package com.ld.wms.business.chat.controller;

import com.ld.wms.business.chat.service.ChatService;
import com.ld.wms.business.chat.vo.resp.DataStatisticRespVo;
import com.ld.wms.business.chat.vo.resp.IndexQuantityDataRespVo;
import com.ld.wms.common.ResultResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@Tag(name = "首页和图表相关接口相关接口")
@RestController
public class ChartController {

    @Autowired
    private ChatService chatService;

    @GetMapping("/api/wms/menu/getIndexQuantityData")
    @Operation(summary = "获取终端首页信息")
    public ResultResponse<IndexQuantityDataRespVo> getIndexQuantityData() {
        IndexQuantityDataRespVo indexQuantityData = chatService.getIndexQuantityData();
        return ResultResponse.success(indexQuantityData);
    }

    @GetMapping("/api/wms/menu/getInfoBoard")
    @Operation(summary = "终端信息看板")
    public ResultResponse<DataStatisticRespVo> getInfoBoard() {
        DataStatisticRespVo dataStatisticRespVo = chatService.getInfoBoard();
        return ResultResponse.success(dataStatisticRespVo);
    }
}
